
package testObserver;

public abstract class Weather {

    private Data data;

    public Weather(Data d) {
        data = d;
    }

    public void setTemperature(int temp) {
        data.setData(this, temp);
    }

    public int getTemperature() {
        return data.getData();
    }

    protected abstract void onChange();
}
